import json
user = {'username': 'byref', 'age': 100}
print(user['age'])

x =  '{ "name":"John", "age":30, "city":"New York"}'

# parse x:
y = json.loads(x)
print(y['name'])


jsonStr = json.dumps(user)
print('user json', jsonStr)